/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package wa.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 *
 * @author twh
 */
@Entity
@Table(name="t_user")
public class User {

    @Id @GeneratedValue
    private Long id;

    @Column(nullable=false)
    private String name;
    private String nickname;
    private String shortdesc;

    @Enumerated(EnumType.STRING)
    private LanguageType preferedLanguage;

    private String email;

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public LanguageType getPreferedLanguage() {
        return preferedLanguage;
    }

    public void setPreferedLanguage(LanguageType preferedLanguage) {
        this.preferedLanguage = preferedLanguage;
    }

    public String getShortdesc() {
        return shortdesc;
    }

    public void setShortdesc(String shortdesc) {
        this.shortdesc = shortdesc;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
    
}
